import Vue from 'vue'
import Router from 'vue-router'
import Home from '../pages/Home'
// import Category from '../pages/Category'

Vue.use(Router)

export default new Router({
  linikActiveClass:"is-active",
  routes: [
    {
      path:'/',
      component:Home
    },
    {
      path:'/Category',
      component:resolve=>{
        require(['../pages/Category'],resolve)
      }
    },
    {
      path:'/roomList/:gameId/:gameName',
      component:resolve=>{
        require(['../pages/roomList'],resolve)
      }
    },
    {
      path:'/recommend',
      component:resolve=>{
        require(['../pages/Recommend'],resolve)
      }
    },
    {
      path:'/user',
      component:resolve=>{
        require(['../pages/User'],resolve)
      }
    },
    {
      path:'*',
      redirect:'/'
    }
  ]
})
